<?php

namespace app\controller;

use app\BaseController;
use app\model\admin\Order;
use app\model\admin\SysMember;
use app\queue\CloseOrder;
use app\service\OrderService;
use app\utils\captcha\CaptchaApi;
use think\facade\Queue;
use Kkokk\Poster\Facades\Poster;
use Kkokk\Poster\Exception\Exception;
use Kkokk\Poster\PosterManager;
use think\facade\Db;

class Captcha extends BaseController
{
    public function img()
    {
        // $q_res = Queue::later($this->miniInfo['closeOrder'], CloseOrder::class, $data = [
        //     "order_id" => 67
        // ]);
        // if (!$q_res) {
        //     storage_log('超时订单推送队列失败');
        // }
        // OrderService::handleCommission(83);
        // $operator_info = SysMember::where('id', 8)->find();
        // $res = Db::table('member_user')->where([
        //     "id" => 8,
        // ])->inc('balance', 0)->update();
        // var_dump($res);
        $data = CaptchaApi::create();
        return success($data, '获取成功');
    }
}
